<div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">角色列表</h3>

                <div class="box-tools">
                    <button class="btn btn-success btn-sm" data-url="{{ url('/admin/roles/create') }}" onclick="jumpfun(this)">添加</button>
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                        <th>ID</th>
                        <th>角色名</th>
                        <th>显示名称</th>
                        <th>描述</th>
                        <th>操作</th>
                    </tr>
                    @foreach($roles as $role)
                    <tr>
                        <td>{{ $role->id }}</td>
                        <td>{{ $role->name }}</td>
                        <td>{{ $role->display_name }}</td>
                        <td>{{ $role->description }}</td>
                        <td>
                            <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/roles/'.$role->id.'/edit') }}" onclick="jumpfun(this)" class="X-Small btn-xs text-success "><i class="fa fa-edit"></i> 编辑</a>
                            @if ($role->id != 1)
                                <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/roles', $role->id) }}" onclick="delfun(this)" class="X-Small btn-xs text-danger "><i class="fa fa-edit"></i> 删除</a>
                            @endif
                        </td>
                    </tr>
                    @endforeach
                </table>
            </div>
            <div class="box-footer clearfix">
                <ul class="pagination pagination-sm no-margin pull-right">
                    {!! $roles->links('vendor.pagination.pages') !!}
                </ul>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
